package com.youshang520i.nacosserviceconsume.service.impl;

import com.youshang520i.nacosserviceconsume.service.ConsumeService;
import com.youshang520i.nacosserviceconsume.service.fallback.ConsumeServiceFallbackFactory;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author youshang
 */
@Data
@Log4j2
@NoArgsConstructor
public class ConsumeServiceImpl implements ConsumeService {

    private Throwable throwable;

    public ConsumeServiceImpl(Throwable throwable){
        this.throwable = throwable;
    }

    @Override
   public String index(String str){
       String message = throwable.getMessage();
       return "当前请求繁忙！！！请求参数有误！！！  " + str  + " 异常： "+message;
   }
}
